//#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

//using namespace std;

typedef struct _list_node_s {
    int data;
    struct _list_node_s *next;
}list_node_t;

list_node_t *CreateList(int n)
{
    if (n <= 0)
        return NULL;
    list_node_t *_newList = NULL, *_tmp = NULL, *tmp = NULL;
    while (n--) {
        if (_newList==NULL) {
            _newList = (list_node_t*)malloc(sizeof(list_node_t));
            if (_newList) {
                _newList->data = n;
                _newList->next = NULL;
                _tmp = _newList;
            } else 
                break;
       } else {
           tmp = (list_node_t*)malloc(sizeof(list_node_t));
           _newList->next = tmp;
           _newList = tmp;
           if (_newList) {
                _newList->data = n;
            } else
                break;
       }
    }
    return _tmp;
}

void DisplayList(list_node_t *list, int n) 
{
    list_node_t *tmp = list;
    while (n--&&tmp) {
        printf("%d\n", tmp->data);
        tmp = tmp->next;
    }
}

int main(int argc, const char *argv[])
{
    list_node_t *m_list;
    int n;
    int k;
    scanf("%d", &n);
    //cin >> n;
    m_list = CreateList(n);
   
    int i;
    list_node_t *header = NULL, *tail = NULL, *tmp, *_tmp;
    tail = header = m_list;
    tmp = m_list->next;
    tail->next = header->next = NULL;
    for (;tmp;) {
        _tmp = tmp->next;
        tmp->next = header;
        header = tmp;

        tmp = _tmp;
    }

    DisplayList(header, n);
    return 0;
}
